parent := d.Get("parent").(string)
var opRes map[string]interface{}
err = computeOrgOperationWaitTimeWithResponse(
	config, res, &opRes, parent, "Creating OrganizationSecurityPolicy", userAgent,
	d.Timeout(schema.TimeoutCreate))

if err != nil {
	// The resource didn't actually create
	d.SetId("")
	return fmt.Errorf("Error waiting to create OrganizationSecurityPolicy: %s", err)
}

policyId, ok := opRes["targetId"]
if !ok {
	return fmt.Errorf("Create response didn't contain targetId. Create may not have succeeded.")
}
if err := d.Set("policy_id", policyId.(string)); err != nil {
	return fmt.Errorf("Error setting policy_id: %s", err)
}

// Store the ID now.
id, err = replaceVars(d, config, "locations/global/securityPolicies/{{policy_id}}")
if err != nil {
	return fmt.Errorf("Error constructing id: %s", err)
}
d.SetId(id)
